import request from '@/utils/request'

// 查询创建房间列表
export function listGameRecord(query) {
  return request({
    url: '/metaverse-gameRecord/gameRecord/list',
    method: 'get',
    params: query
  })
}

// 查询创建房间详细
export function getGameRecord(gameNum) {
  return request({
    url: '/metaverse-gameRecord/gameRecord/' + gameNum,
    method: 'get'
  })
}

// 新增创建房间
export function addGameRecord(data) {
  return request({
    url: '/metaverse-gameRecord/gameRecord',
    method: 'post',
    data: data
  })
}

// 修改创建房间
export function updateGameRecord(data) {
  return request({
    url: '/metaverse-gameRecord/gameRecord',
    method: 'put',
    data: data
  })
}

// 删除创建房间
export function delGameRecord(gameNum) {
  return request({
    url: '/metaverse-gameRecord/gameRecord/' + gameNum,
    method: 'delete'
  })
}

//更改游戏状态
export function updateStatus(gameNum){
  return new request({
    url: '/metaverse-gameRecord/gameRecord/update/'+ gameNum,
    method: 'get',
  })
}
